import React from 'react';
import "./Articles.css"
import { NavLink, useLocation} from 'react-router-dom';

import { Message} from "../Message/message"

export const Articles = ()=>{
   
    let {pathname} = useLocation()
    return (
        <>
            <div className="nav-box">
                <li><NavLink to={pathname + "?sort=hot"}>热门</NavLink></li>
                <li><NavLink to={pathname + "?sort=new"}>最新</NavLink></li>
                <li><NavLink to={pathname + "?sort=history"}>历史</NavLink></li>
            </div>
            <Message />    
        </>
    )
}